module.exports = {
    mode: 'universal',
    /*
     ** Headers of the page
     */
    head: {
        title: '首页 | 三菱电机自动化(中国)有限公司',
        meta: [
            { charset: 'utf-8' },
            { name: 'viewport', content: 'width=device-width, initial-scale=1' },
            { hid: 'description', name: 'description', content: '三菱电机自动化(中国)有限公司' }
        ],
        link: [
            { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
        ]
    },
    // server: {
    //     port: 8000, // default: 3000
    //     host: '0.0.0.0', // default: localhost
    // },
    loading: { color: '#fff' },
    /*
     ** Global CSS
     */
    css: [
        // 'element-ui/lib/theme-chalk/index.css',
        '@/assets/css/theme/00B4A5/index.css',
        '@/assets/css/main.css',
        '@assets/css/common.css',
        { src: "swiper/dist/css/swiper.css" }
    ],
    /*
     ** Plugins to load before mounting the App
     */
    plugins: [
        '@/plugins/element-ui',
        "~/plugins/axios",
        "@/plugins/api",
        { src: "~/plugins/vue-swiper.js", ssr: false },
        { src: '~/plugins/common.js', ssr: false }
        // "@/plugins/jquery.min",
        // { src: '~plugins/slick', ssr: false }
    ],
    /*
     ** Nuxt.js dev-modules
     */
    buildModules: [],
    /*
     ** Nuxt.js modules
     */
    modules: [
        // Doc: https://axios.nuxtjs.org/usage
        '@nuxtjs/axios',
    ],
    /*
     ** Axios module configuration
     ** See https://axios.nuxtjs.org/options
     */
    // TODO 
    axios: {
        baseURL: 'http://192.168.1.100', //线上地址
        proxy: true, //使用线上地址时,需要把代理地址关闭关闭设置为false
        // prefix: '/api', // baseURL
        credentials: true,
    },
    proxy: [
        ['/api', { target: 'http://47.101.53.144:5678/', pathRewrite: { '^/api': '' } }],
        // ['/upload', { target: 'http://192.168.1.116:8092', pathRewrite: { '^/upload': '' } }],
    ],
    env: {
        baseUrl: process.env.BASE_URL
    },
    // TODO 
    /*
     ** Build configuration
     */
    build: {
        transpile: [/^element-ui/],
        /*
         ** You can extend webpack config here
         */
        extend(config, ctx) { }
    }
}